{% extends "base.html" %}
{% load account %}
{% block page_title %}Confirm E-mail{% endblock %}

{% block content %}
<div class="row">
  <div class="col-md-6 col-md-offset-3">
    <div class="card">
      <div class="cardface">
        <h2>Confirm E-mail Address</h2>
        {% if confirmation %}
          {% user_display confirmation.email_address.user as user_display %}
          <p>
            Please confirm that <a href="mailto:{{ confirmation.email_address.email }}">{{ confirmation.email_address.email }}</a>
            is an e-mail address for user <strong>{{ user_display }}</strong>.
          </p>
          <form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
            {% csrf_token %}
            <div class="form-group">
              <button class="btn btn-primary" type="submit">Confirm</button>
            </div>
          </form>
        {% else %}
          {% url 'account_email' as email_url %}
          <p>
            This e-mail confirmation link expired or is invalid. Please <a href="{{ email_url }}">issue a new e-mail confirmation request</a>.
          </p>
        {% endif %}
      </div>
    </div>
  </div>
</div>
{% endblock %}
